PHP Mail()发送邮件乱码解决方案

Categories: PHP; Tagged with: ; @ July 16th, 2010 22:30

网上有很多Mail()乱码的解决方案, 但试了几个都不. 彻底的解决方法是重写php.ini中的代码设置: 将以下代码加到mail()前:

/**
 * Solve the email problem.
 */
ini_set("mbstring.language", "Neutral");
ini_set("mbstring.internal_encoding", "UTF-8");
ini_set("mbstring.http_input", "UTF-8");
ini_set("mbstring.http_output", "UTF-8");
ini_set("mbstring.encoding_translation", "On");
ini_set("mbstring.detect_order", "auto");
ini_set("mbstring.substitute_character", "long");

<->



// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.